package edu.ar.bases.dvdstore.domainmodel.entities;

import java.util.Set;

import edu.ar.bases.dvdstore.domainmodel.entities.interfaces.ITitulo;




public class Titulo implements ITitulo {

	private int tituloID;
	private String titulo;
	private String director;
	private String actor;
	public Set<Dvd> dvds;

	public Titulo(){

	}

	public void finalize() throws Throwable {

	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.ITitulo#getTituloID()
	 */
	public int getTituloID() {
		return tituloID;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.ITitulo#setTituloID(int)
	 */
	public void setTituloID(int tituloID) {
		this.tituloID = tituloID;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.ITitulo#getTitulo()
	 */
	public String getTitulo() {
		return titulo;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.ITitulo#setTitulo(java.lang.String)
	 */
	public void setTitulo(String titulo) {
		this.titulo = titulo;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.ITitulo#getDirector()
	 */
	public String getDirector() {
		return director;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.ITitulo#setDirector(java.lang.String)
	 */
	public void setDirector(String director) {
		this.director = director;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.ITitulo#getActor()
	 */
	public String getActor() {
		return actor;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.ITitulo#setActor(java.lang.String)
	 */
	public void setActor(String actor) {
		this.actor = actor;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.ITitulo#getDvds()
	 */
	public Set<Dvd> getDvds() {
		return dvds;
	}

	
	/* (non-Javadoc)
	 * @see edu.ar.bases.dvdstore.domainmodel.entities.ITitulo#setDvds(java.util.Set)
	 */
	public void setDvds(Set<Dvd> dvds) {
		this.dvds = dvds;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((actor == null) ? 0 : actor.hashCode());
		result = prime * result
				+ ((director == null) ? 0 : director.hashCode());
		result = prime * result + ((dvds == null) ? 0 : dvds.hashCode());
		result = prime * result + ((titulo == null) ? 0 : titulo.hashCode());
		result = prime * result + tituloID;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final Titulo other = (Titulo) obj;
		if (actor == null) {
			if (other.actor != null)
				return false;
		} else if (!actor.equals(other.actor))
			return false;
		if (director == null) {
			if (other.director != null)
				return false;
		} else if (!director.equals(other.director))
			return false;
		if (dvds == null) {
			if (other.dvds != null)
				return false;
		} else if (!dvds.equals(other.dvds))
			return false;
		if (titulo == null) {
			if (other.titulo != null)
				return false;
		} else if (!titulo.equals(other.titulo))
			return false;
		if (tituloID != other.tituloID)
			return false;
		return true;
	}

}